package generic;



/**
 * @Author:Cjj
 * @Date: 2025/6/16
 */
public class List<E>  {
    E obj;
    Object [] items=new Object[10];

    public void add(int index,int val){
        if(index>=items.length){
            System.out.println("下标越界");
            return;
        }
        items[index]=val;
    }
    public E get(int index){
        if(index>=items.length){
           System.out.println("下标越界");
           return null;
        }
      return (E) items[index];
    }


}
